package com.redtree.air.db
{
	import mx.formatters.DateFormatter;

	public class Note extends Object
	{
		private var _id:int;
		private var _title:String;
		private var _content:String;
		private var _dateInsert:Date;
		private var _securityLevel:int;
		private var _securityName:String;
		private var _dateString:String;
		
		public function Note(row:Object)
		{
			super();
			_id = row['id'];
			_title = row['title'];
			_content = row['content'];
			_dateInsert = row['date_insert'];
			_securityLevel = row['security_level'];
			_securityName = row['security_name'];
		}

		public function get dateString():String
		{
//			var d:Date = new Date();
//			d.setUTCDate(_dateInsert);
			var df:DateFormatter = new DateFormatter();
			df.formatString = 'YYYY/MM/DD HH:NN:SS'; 
			_dateString = df.format(_dateInsert);
			return _dateString;
		}

		public function set dateString(value:String):void
		{
			_dateString = value;
		}

		public function get securityLevel():int
		{
			return _securityLevel;
		}

		public function set securityLevel(value:int):void
		{
			_securityLevel = value;
		}

		public function get content():String
		{
			return _content;
		}

		public function set content(value:String):void
		{
			_content = value;
		}

		public function get title():String
		{
			return _title;
		}

		public function set title(value:String):void
		{
			_title = value;
		}

		public function get id():int
		{
			return _id;
		}

		public function set id(value:int):void
		{
			_id = value;
		}

		public function get dateInsert():Date
		{
			return _dateInsert;
		}

		public function set dateInsert(value:Date):void
		{
			_dateInsert = value;
		}

		public function get securityName():String
		{
			return _securityName;
		}

		public function set securityName(value:String):void
		{
			_securityName = value;
		}


	}
}